package com.tyk.bookstore.back.product.model.query;

import com.tyk.bookstore.back.product.model.constant.PublisherValidateConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
/**
 * @author tyk
 * @description 出版社
 */
@Data
@Schema(name = "PublisherAddQuery", description = "出版社")
public class PublisherAddQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "名字")
    @NotBlank
    @Size(min = PublisherValidateConstant.NAME_MIN_LENGTH, max = PublisherValidateConstant.NAME_MAX_LENGTH)
    @Pattern(regexp = PublisherValidateConstant.NAME_REGEXP)
    private String name;

    @Schema(description = "描述")
    @NotBlank
    @Size(min = PublisherValidateConstant.DESCRIPTION_MIN_LENGTH, max = PublisherValidateConstant.DESCRIPTION_MAX_LENGTH)
    @Pattern(regexp = PublisherValidateConstant.DESCRIPTION_REGEXP)
    private String description;

}
